<?php
require_once(MODEL_DIR . "character.php");
$id = $data->params->userId;
$opponentId = $data->params->opponentId;
$character = new Character();
$r = $character->getInfo($id);
write_log("get info:" . json_encode($r));
if(false === $r)
{
    returnError(ErrorCode::DB_ERROR, "getuserinfo error");
    exit();
}
else
{
    $r1 = $character->getInfo($opponentId);
    if( false === $r1)
    {
        returnError(ErrorCode.DB_ERROR, "getuserinfo error");
        exit();
    }
    write_log("character:" . json_encode(array($id => $r, $opponentId => $r1)));
    returnSucc($data->action, array($id => $r, $opponentId => $r1));
}
?>
